<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

<ui:composition template="/WEB-INF/templates/principal.xhtml">
	<ui:define name="content-container2">
		<div id="section-navigation">						
			<h3>Op&ccedil;&otilde;es</h3>
			<p:separator id="separator2"/>
			<div id="link-menu">
				<h:outputLink  value="#{request.contextPath}/usuario/cadastro" >Cadastre-se</h:outputLink>				
			</div>					
		</div>
		<div id="content">
			<ui:insert name="conteudo"/>
			<h3>Descadastro</h3>
			<p:separator id="separator"/>			
			<h:form id="formDescadastro">		
				<p:messages id="messages" showDetail="true" autoUpdate="false" showSummary="false"/>		
				<h:panelGrid columns="2" cellpadding="5">					
					<h:outputLabel value="Informe seu e-mail" for="email"/>
					<p:inputText value="#{consumidorManagedBean.emailDescadastro}" id="email" size="50"
					required="true" requiredMessage="E-mail deve ser informado" validatorMessage="E-mail está com formato incorreto">						
						<f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
					</p:inputText>					         		
					<p:commandButton value="Enviar" update="formDescadastro, messages" actionListener="#{consumidorManagedBean.descadastrar()}"/>
				</h:panelGrid>						
			</h:form>
		</div>
	</ui:define>
</ui:composition>

</html>